#pragma once
#include"rb_tree.h"

namespace ybc
{
	template<class K>
	class set
	{
		struct setKeyOfT
		{
			const K& operator() (const K& key)
			{
				return key;
			}
		};
	public:
		typedef typename RBTree<K, const K, setKeyOfT>::iterator iterator;
		typedef typename RBTree<K, const K, setKeyOfT>::const_iterator const_iterator;

		iterator begin()
		{
			return _t.begin();
		}

		iterator end()
		{
			return _t.end();
		}

		const_iterator cbegin() const
		{
			return _t.cbegin();
		}

		const_iterator cend() const
		{
			return _t.cend();
		}

		pair<iterator, bool> insert(const K& key)
		{
			return _t.insert(key);
		}

		iterator find(const K& key)
		{
			return _t.find(key);
		}
	private:
		RBTree<K, const K, setKeyOfT> _t;
	};
}